clock->samples   scheme


Defined in:  https://github.com/digego/extempore/tree/v0.8.9/runtime/scheme.xtm

Implementation

;; convert from clock to audio samples
(define clock->samples
   (lambda (time)
      (let* ((t1 (clock:clock))
       (t2 (clock:ad:clock))
       (t3 (round (+ (+ (car t2) (* (- time t1) *samplerate*))
         (* (- t1 (cdr t2)) *samplerate*)))))
   (real->integer t3))))


Back to Index